clear all
set more off
cap log close

****************************************************************************
* This do-file extract data from the demographic files 
*	- lin, year, age 
* 
* Creates the following Stata file:
*	- age.dta
* 
****************************************************************************

do "H:\Lavecchia_7086\to-transfer-jan-2022\RESTAT_Replication_Programs\0_Set_Directories.do"

log using "$dir_log\1d_Extract_age.log", replace

* Step 1: load the data from demographic files which contain the age__i var

use "$dir_data\demographic_8299.dta"
keep lin__i year age__i
append using "$dir_data\demographic_0016.dta"
keep lin__i year age__i
save "$dir_data\age.dta", replace 

